<%@ page import="sige.Responsavel" %>
<%@ page import="sige.Contrato" %>

<g:if test="${contratoInstance}">
<!----------------------------------DADOS DO CONTRATO-------------------------------------->
<div class="control-group" >
    <label  class="control-label" for="NULL">
    </label>
    <div class="controls" > 
        <h5>
          <g:message code="dadosDoContrato.label" default="Dados do Contrato" />
        </h5>
    </div>
</div>

<div class="control-group" >
	 <label  class="control-label" for="aluno">
		<g:message code="contrato.aluno.label" default="Aluno" />
		
	</label> 
 	 <div class="controls"> 
	    <g:field type="text" name="aluno" class="span4" readonly="readonly" value="${contratoInstance?.aluno?.nome}"/>
	 </div>
 </div>
 
 <div class="control-group" >
	 <label  class="control-label" for="turma">
		<g:message code="contrato.turma.label" default="Turma" />
		
	</label> 
 	 <div class="controls"> 
        <g:field type="text" name="turma" readonly="readonly" value="${contratoInstance?.turma}"/>
	 </div> 
 </div>
 
 <div class="control-group">
    <label  class="control-label" for="selecResp">
    <g:message code="responsavel.selecionar.label" default="Selecionar Responsável" />
    </label>
    <div class="controls" >
        <g:each  in="${['nenhum', 'pai', 'mae']}" var="n">
            <g:remoteLink action="preencheDados" id="${contratoInstance?.id}" update="forme"
                  params="['escolha': n]" class="btn btn-info">
                        <g:message code="responsavel.${n}.label" default=" ${n}" />
            </g:remoteLink>
        </g:each>
    </div>
</div>
 
</g:if>

<!------------------------------DADOS DO RESPONSÁVEL------------------------------->
 
 <div class="control-group" >
    <label  class="control-label" for="NULL">
    </label>
    <div class="controls" > 
        <h5>
          <g:message code="dadosDoResponsavel.label" default="Dados do Responsável" />
        </h5>
    </div>
</div>

<div class="control-group" >
	 <label  class="control-label" for="nome">
		<g:message code="responsavel.nome.label" default="Nome" />
		
	</label> 
 	 <div class="controls"> 
	<g:textField name="nome" class="span4" value="${responsavelInstance?.nome}"/>
	 </div> 
 </div>
 
 <div class="control-group" >
    <label  class="control-label" for="cpf">
        <g:message code="responsavel.cpf.label" default="CPF" />
	</label> 
    <div class="controls"> 
        <g:cpfField value="${responsavelInstance?.cpf}" name="cpf" />
    </div> 
 </div>

<div class="control-group" >
	 <label  class="control-label" for="rg">
		<g:message code="responsavel.rg.label" default="Rg" />
		
	</label> 
 	 <div class="controls"> 
	<g:textField name="rg" value="${responsavelInstance?.rg}"/>
	 </div> 
 </div>
 
<div class="control-group" >
	 <label  class="control-label" for="nacionalidade">
		<g:message code="responsavel.nacionalidade.label" default="Nacionalidade" />
		
	</label> 
 	 <div class="controls"> 
	<g:textField name="nacionalidade" value="${responsavelInstance?.nacionalidade}"/>
	 </div> 
 </div>
 
<div class="control-group" >
	 <label  class="control-label" for="naturalidade">
		<g:message code="responsavel.naturalidade.label" default="Naturalidade" />
		
	</label> 
 	 <div class="controls"> 
	<g:textField name="naturalidade" value="${responsavelInstance?.naturalidade}"/>
	 </div> 
 </div>

<div class="control-group" >
	 <label  class="control-label" for="estadoCivil">
		<g:message code="responsavel.estadoCivil.label" default="Estado Civil" />
		
	</label> 
 	 <div class="controls"> 
	<g:select name="estadoCivil" from="${responsavelInstance.constraints.estadoCivil.inList}" 
	    value="${responsavelInstance?.estadoCivil}" valueMessagePrefix="responsavel.estadoCivil" 
	    noSelection="['': '']" class="span2" />
	 </div> 
 </div>

<div class="control-group" >
	 <label  class="control-label" for="profissao">
		<g:message code="responsavel.profissao.label" default="Profissao" />
		
	</label> 
 	 <div class="controls"> 
	<g:textField name="profissao" value="${responsavelInstance?.profissao}"/>
	 </div> 
 </div>
 
 <div class="control-group" >
	 <label  class="control-label" for="carteiraDeTrabalho">
		<g:message code="responsavel.carteiraDeTrabalho.label" default="Carteira de Trabalho" />
		
	</label> 
 	 <div class="controls"> 
	     <g:textField name="carteiraDeTrabalho" value="${responsavelInstance?.carteiraDeTrabalho}" />
	 </div> 
 </div>
 
 <div class="control-group" >
	 <label  class="control-label" for="serie">
		<g:message code="responsavel.serie.label" default="Série" />
		
	</label> 
 	 <div class="controls"> 
	    <g:textField name="serie" value="${responsavelInstance?.serie}"/>
	 </div> 
 </div>
 
 <!------------------------------DADOS DE CONTATO------------------------------->
 <div class="control-group" >
    <label  class="control-label" for="NULL">
    </label>
    <div class="controls" > 
        <h5>
          <g:message code="dadosDeContato.label" default="Dados de Contato" />
        </h5>
    </div>
</div>
 
<div class="control-group" >
	 <label  class="control-label" for="email">
		<g:message code="responsavel.email.label" default="Email" />
		
	</label> 
 	 <div class="controls"> 
	<g:textField name="email" class="span4" value="${responsavelInstance?.email}"/>
	 </div> 
 </div>
 
 <div class="control-group" >
	 <label  class="control-label" for="fone">
		<g:message code="responsavel.fone.label" default="Fone" />
		
	</label> 
 	 <div class="controls"> 
	    <g:foneField name="fone" class="span4" value="${responsavelInstance?.fone}"/>
	 </div> 
 </div>

<div class="control-group" >
	 <label  class="control-label" for="rua">
		<g:message code="responsavel.rua.label" default="Rua" />
		
	</label> 
 	 <div class="controls"> 
	    <g:textField name="rua" class="span4" value="${responsavelInstance?.rua}"/>
	 </div> 
 </div>
 
<div class="control-group" >
	 <label  class="control-label" for="numero">
		<g:message code="responsavel.numero.label" default="Numero" />
		
	</label> 
 	 <div class="controls"> 
	    <g:textField name="numero" class="span1" value="${responsavelInstance?.numero}"/>
	 </div> 
 </div>

<div class="control-group" >
	 <label  class="control-label" for="bairro">
		<g:message code="responsavel.bairro.label" default="Bairro" />
		
	</label> 
 	 <div class="controls"> 
	<g:textField name="bairro" class="span4" value="${responsavelInstance?.bairro}"/>
	 </div> 
 </div>

<div class="control-group" >
    <label  class="control-label" for="cep">
        <g:message code="responsavel.cep.label" default="Cep" />
    </label> 
    <div class="controls">
	    <g:field type="text" maxlength="9" class="span2" value="${responsavelInstance?.cep}"
	        name="cep" pattern="[0-9]{5}-[0-9]{3}" placeholder="00000-000"/>
    </div> 
</div>

<div class="control-group" >
    <label  class="control-label" for="cidade">
		<g:message code="responsavel.cidade.label" default="Cidade" />
	</label> 
 	 <div class="controls"> 
 	    <g:textField name="cidade" class="span4" value="${responsavelInstance?.cidade}"/>
	 </div> 
</div>

<div class="control-group" >
    <label  class="control-label" for="estado">
		<g:message code="responsavel.estado.label" default="Estado" />
	</label> 
    <div class="controls"> 
        <g:textField name="estado" class="span4" value="${responsavelInstance?.estado}"/>
    </div> 
</div>
<!----------------------------------------------------------------------------->

